package com.glamour.hlcity.biz.batch.quartz;

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.quartz.JobExecutionContext;
import org.quartz.JobExecutionException;
import org.quartz.StatefulJob;
public abstract class AbstractJob implements StatefulJob {

	protected final static Log LOG=LogFactory.getLog(AbstractJob.class);
	@Override
	public void execute(JobExecutionContext context)
			throws JobExecutionException {
		LOG.info("启动任务:"+getJob());
		//任务处理
		doJob(context);
		LOG.info("结束任务:"+getJob());

	}
	
	protected abstract String getJob();
	
	protected abstract void doJob(JobExecutionContext context) throws JobExecutionException ;

}
